var countDownDate = new Date("Jan 5, 2028 00:00:00");
      
      // Update the count down every 1 second
      var x = setInterval(function() {
      
          //得到当前时间
          var now = new Date();
          
          // 
          var distance = countDownDate - now;
          
          //获得小时，分钟。秒
         
          var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
          var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
          var seconds = Math.floor((distance % (1000 * 60)) / 1000);
          
          // 将信息返回到html中
          document.getElementById("demo").innerHTML = hours + "小时"
          + minutes + "分钟 " + seconds + "秒";
      }, 1000);
      //每日任务
      var light=["收集红色光芒","收集蓝色光芒",
                   "收集橙色光芒","收集绿色光芒","追逐散落的星光"];
        var friend=["向一位玩家传递能量","向朋友做一个动作","合力开启双门人"
                    ,"给朋友送礼","接受朋友的礼物","和陌生人一起坐在长凳上" , 
                    "和朋友击掌"];
        var act=["掀翻五只螃蟹","收集30点烛火","净化十株黑暗植物",
                 "面对冥龙","拯救一只被黑暗藤蔓困住的遥鲲","在雨林重温先祖的美好回忆",
                 "在霞谷重温先祖的美好回忆","在墓土重温先祖的美好回忆","在云野重温先祖的美好回忆",
                 "在晨岛重温先祖的美好回忆"]
        var think=["远古战场冥想","仙乡金塔下冥想"," 霞光城拱门冥想","在秘密花园冥想",
                  "密林遗迹冥想","在蝴蝶平原冥想","在云顶浮石冥想","在幽光山洞冥想",
                  "在锦鲤池冥想","在溜冰场冥想"]
        function radom(Array){
           var z = Array.length;
            parseInt(Math.random()*z,10);
           var y = Math.floor(Math.random()*z);
          return Array[y];
        }
        var d=[radom(light),radom(friend),radom(act),radom(think)];
        var box=document.getElementById("test");
        var number=box.children;

        window.setInterval(function(){
    var refreshHours = new Date().getHours();
    var refreshMin = new Date().getMinutes();
    var refreshSec = new Date().getSeconds();
    if(refreshHours=='10' && refreshMin=='24' && refreshSec=='0'){
        var c=[radom(light),radom(friend),radom(act),radom(think)];
        for(var j=0;j<number.length;j++){
          number[j].innerHTML=c[j];
        }
        d=c.concat([]);
    }
    else{
        for(var j=0;j<number.length;j++){
          number[j].innerHTML=d[j];
    }
}
}, 1000);